<h2>Disabling authentication</h2>
<p>If you are running Trilium on <code>localhost</code> only or if authentication
  is handled by another component, you can disable Trilium’s authentication
  by adding the following to <code>config.ini</code>:</p><pre><code class="language-text-x-trilium-auto">[General]
noAuthentication=true</code></pre>
<p>Disabling authentication will bypass even the&nbsp;<a class="reference-link"
  href="#root/_help_7DAiwaf8Z7Rz">Multi-Factor Authentication</a>&nbsp;since
  v0.94.1.</p>
<h2>Understanding how the session works</h2>
<p>Once logged into Trilium, the application will store this information
  about the login into a cookie on the browser, but also as a session on
  the server.</p>
<p>If “Remember me” is checked, then the login will expire in 21 days. This
  period can be adjusted by modifying the <code>Session.cookieMaxAge</code> value
  in <code>config.ini</code>. For example, to have the session expire in one
  day:</p><pre><code class="language-text-x-trilium-auto">[Session]
cookieMaxAge=86400</code></pre>
<p>When “Remember me” is unchecked, the behavior is different. At client/browser
  level the authentication does not have any expiration date, but it will
  be automatically cleared as soon as the user closes the browser. Nevertheless,
  the server will also dismiss this authentication in around 24 hours from
  the <em>last interaction with the application</em>.</p>
<h2>Viewing active sessions</h2>
<p>The login sessions are now stored in the same&nbsp;<a class="reference-link"
  href="#root/_help_wX4HbRucYSDD">Database</a>&nbsp;as the user data. In
  order to view which sessions are active, open the&nbsp;<a class="reference-link"
  href="#root/_help_YKWqdJhzi2VY">SQL Console</a>&nbsp;and run the following
  query:</p><pre><code class="language-text-x-trilium-auto">SELECT * FROM sessions</code></pre>
<p>Expired sessions are periodically cleaned by the server, generally an
  hourly interval.</p>
<h2>See also</h2>
<ul>
  <li><a class="reference-link" href="#root/_help_7DAiwaf8Z7Rz">Multi-Factor Authentication</a>
  </li>
</ul>